package com.ywgt.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ywgt.pojo.Admin;
import com.ywgt.mapper.AdminMapper;
import com.ywgt.service.AdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ywgt.util.ResponseUtil;
import org.springframework.stereotype.Service;
import sun.security.krb5.internal.PAData;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 管理员表 服务实现类
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {


    @Override
    public Page<Admin> getAdmins(String username, int page, int limit, String sort, String order) {
        PageHelper.startPage(page,limit);
        return baseMapper.selectAdmins(username,sort,order);
    }

    public List<Admin> getAll(){
        return this.list();
    }
}
